<?php
/* 
 * ********* CVS HEADER ********* 
 * 
 * $RCSfile: admmenuadd.php,v $ 
 * $Date: 2005/10/21 12:58:07 $ 
 * $Revision: 1.3 $ 
 * 
 * ********* CVS HEADER ********* 
 */
$message="";
if($action=="process"){
	$query="UPDATE environnement SET lastmod=NOW()";
	@rportalrequete($query) or rportalerreur($query,"?op=admmenuliste");
	$query="INSERT INTO rportal_menu (nom,titre,fichier) VALUES ('$nom','$titre','$fichier')";
    $res=@rportalrequete($query) or rportalerreur($query,"?op=admmenuliste");
    $mid = rportallastid($res);
    header("Location: ?op=admmenuview&mid=$mid");
    exit;
}
require_once("module/TPLN/TPLN.php"); 
$TPLN = new TPLN; 
$TPLN->Open($op_basepath."tpl/admmenuadd.html"); 
$TPLN->IncludeFile("header","environnement/$session[environnement]/header.php"); 
$TPLN->IncludeFile("footer","environnement/$session[environnement]/footer.php");

require_once(get_path_module("admin"));
$pc = new panneau_controle();
$pc->calculRubriqueParFonction($op);
$TPLN->Parse("panneau_controle",$pc->retourneEntete());

$TPLN->Parse("message",$message);
$TPLN->Parse("add","?op=admmenuadd");
$TPLN->Write(); 
?>